package com.damai.utils.value;

import java.io.IOException;

import com.citywithincity.db.interfaces.IValueConvert;
import com.citywithincity.utils.JsonUtil;
import com.citywithincity.utils.StringUtils;

public class String2Map implements IValueConvert {

	@Override
	public Object convert(Object value) {
		String content = (String)value;
		if(StringUtils.isEmpty(content))return null;
		try {
			return JsonUtil.read(content);
		} catch (IOException e) {
			return null;
		}
		
	}

}
